package com.jdz.gxq.info.admin.economic.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.jdz.gxq.info.admin.economic.bo.Economic;
import com.jdz.gxq.info.admin.economic.form.EditEconomicForm;
import com.jdz.gxq.info.admin.economic.service.EconomicService;
import com.jdz.gxq.info.common.action.CommonAction;

public class EditEconomicAction extends CommonAction {

	private EconomicService economicService = null;
	 
	public ActionForward doExecute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws java.lang.Exception {
		
		EditEconomicForm editEconomicForm = (EditEconomicForm) form;
	
		Economic economic = economicService.getEconomicById(editEconomicForm.getId());
		
		editEconomicForm.setEconomic(economic);

		return mapping.findForward("success");
	}

	public void setEconomicService(EconomicService economicService) {
		this.economicService = economicService;
	}
}

